/* style propertys
	hotspotspace: Number
*/
package UIFree.controls
{
	import UIFree.uif_component;
	import UIFree.uif_ecomponent;
	import UIFree.uif_hotspot;
	
	import flash.events.MouseEvent;
	import flash.geom.Rectangle;

	public class uif_gbutton extends uif_hotspotButton {
		public function uif_gbutton(parent:uif_component, ax:int=0, ay:int=0, awidth:int=0, aheight:int=0, styleClass: Object='') {
			super(parent, ax, ay, awidth, aheight, styleClass);
		}
		
		override protected function createHotspot(): uif_ecomponent {
			var inner: Rectangle = getInner();
			return new uif_hotspot(this, inner.x, inner.y, inner.width, inner.height, style['hotspot']);
		}
		
/*		
		public function paintHotspot(graphics: Graphics, a_style: Object): void {
			var mat: Matrix = new Matrix();
			var hsRect: Rectangle 	 = getBorder();
			var hotspotspace: Number = a_style.hotspotspace?a_style.hotspotspace:3;
			var rounds: Array = getRounds(a_style);
			var round: Number = (rounds[0] + rounds[1]) * 0.4;
			var round2: Number = round * 0.5;
			
			hsRect.inflate(-hotspotspace, -hotspotspace);
			hsRect.height =  hsRect.height * 0.5;
			
			mat.createGradientBox(hsRect.width, hsRect.height, Math.PI / 2);
			graphics.lineStyle(0, 0, 0); 
			graphics.beginGradientFill(GradientType.LINEAR, 
						[0xFFFFFF, 0xFFFFFF],
						[0.7, 0.3],
						[0x0, 0xFF],
						mat,
						SpreadMethod.PAD);
			
			graphics.moveTo(hsRect.x + round, hsRect.y);
			graphics.lineTo(hsRect.x + hsRect.width - round, hsRect.y);
			graphics.curveTo(hsRect.x + hsRect.width, hsRect.y, hsRect.x + hsRect.width, hsRect.y + round);
			graphics.lineTo(hsRect.x + hsRect.width, hsRect.y + hsRect.height - round2);
			graphics.curveTo(hsRect.x + hsRect.width, hsRect.y + hsRect.height, hsRect.x + hsRect.width - round2, hsRect.y + hsRect.height);
			
			graphics.curveTo(hsRect.x + hsRect.width * 1/2, hsRect.y + hsRect.height * 1/3, hsRect.x + round2, hsRect.y + hsRect.height);
//			graphics.lineTo(hsRect.x + rounds[3], hsRect.y + hsRect.height);
			graphics.curveTo(hsRect.x, hsRect.y + hsRect.height, hsRect.x, hsRect.y + hsRect.height - round2);
			graphics.lineTo(hsRect.x, hsRect.y + round);
			graphics.curveTo(hsRect.x, hsRect.y, hsRect.x + round, hsRect.y);
			graphics.endFill();
		}
		
		override protected function paint(a_styleClass: String): void {
			var rect: Rectangle = getBorder();
			var l_style: Object = style;
			this.draw_rect(rect.x, rect.y, rect.width, rect.height, l_style);
			_hotspot.graphics.clear();
			paintHotspot(_hotspot.graphics, l_style);
		}*/
	}
}